package bom.service.i.organization;

import bom.pojo.organization.OrgGroup;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional/*(rollbackFor = {IllegalArgumentException.class})*/
public interface OrgGroupService {
    /**
     * 根据父节点来查询最大的节点的值
     *
     * @param parentNode
     * @return
     */
    String getMaxOrgGroup(String parentNode);

    /**
     * 根据菜单节点NODE来查询节点数据
     *
     * @param node
     * @return
     */
    OrgGroup findByNode(String node);

    /**
     * 查询部门下面的人员数量
     *
     * @param id
     * @return
     */
    Integer findOrgGroupUserCount(Long id);

    OrgGroup get(OrgGroup update);

    boolean update(OrgGroup update);

    Map<String, Object> updateOrg(OrgGroup entity);

    Map<String, Object> save(OrgGroup entity);

    Map<String, Object> loadGroupTree();

    List<OrgGroup> query(Object o);

    Map<String, Object> remove(OrgGroup entity);

    boolean delete(OrgGroup entity);
}
